#ifndef RESOURCEMANAGER_H_INCLUDED
#define RESOURCEMANAGER_H_INCLUDED

#include <map>
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>


using std::string;
using std::vector;
using boost::shared_ptr;

namespace engine {
		
	namespace resources {
		using std::map;
		
		template <typename T>
		class ResourceManager {
			protected:
				map<string, shared_ptr<T> > m_Resources;
				
				vector<string> m_ResourcePaths;
			public:
				virtual ~ResourceManager() {}
				virtual bool loadResourceFromFile(const string& name, const string& filename) = 0;
				virtual bool loadResourceFromMemory(const string& name, const char* memory) = 0;
				
				uint getResourceID(const string& resourceName) {
					//assert(m_Resources.find(resourceName) != m_Resources.end());
					return m_Resources[resourceName]->getID();
				}
				
				shared_ptr<T> getResource(const string& resourceName) {
					//assert(m_Resources.find(resourceName) != m_Resources.end());
					return m_Resources[resourceName];
				}
				
				void addResourcePath(const string& path) {
					m_ResourcePaths.push_back(path);
				}
		};
	}
}

#endif // RESOURCEMANAGER_H_INCLUDED
